struct User{
  char nick[64];
  char *hostname;
  char *realname;
  char *servername;
  time_t lasttalk;
  unsigned int access;    /* axs bit field */
  char prefix[2];         /* @ + % */
  unsigned int op:1;
  unsigned int hop:1;
  unsigned int voice:1;
  unsigned int me:1;
  unsigned int away:1;
  unsigned int selected:1;
};

struct history{
  char *lines[100];
  int pos;
  int realpos;
};

struct _xchat_context{
  void *server;
  void *usertree_alpha;
  void *usertree;
  struct User *me;
  char channel[300];
  char waitchannel[300];
  char willjoinchannel[300];
  char channelkey[64];
  int limit;
  int logfd;
  int scrollfd;
  int scrollwritten;
  char lastnick[64];
  struct history history;
  int ops;
  int hops;
  int voices;
  int total;
  char *quitreason;
  char *topic;
  char *current_modes;
  int mode_timeout_tag;
  void *lastlog_sess;
  void *running_exec;
  void *gui;
  void *res;
  int userlisthidden;
  int type;
  int new_data:1;   // new data (purple tab (I ignore))
  int nick_said:1;  // nick highlighted (blue tab)
  int msg_said:1;   // new messages     (red)
  int ignore_date:1;
  int ignore_mode:1;
  int ignore_names:1;
  int end_of_names:1;
  int doing_who:1;
  unsigned int hide_join_part:1;
  unsigned int beep:1;
  unsigned int tray:1;
  unsigned int color_paste:1;
  int done_away_check:1;
  unsigned int lastlog_regexp:1;
};
